<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>parseFloat()方法使用</title>
</head>
<body>
<script>
    console.log(parseFloat('123abc'));  //123
    console.log(parseFloat('0xA'));  //0
    console.log(parseFloat('22.5'));  //22.5
    console.log(parseFloat('192.168.1.1'));  //192.168
    console.log(parseFloat('3.125e7'));  //31250000
    console.log(parseFloat(undefined));  //NaN
    console.log(parseFloat(null));  //NaN
    console.log(parseFloat(true));  //NaN
    console.log(parseFloat(false));  //NaN
</script>
</body>
</html>